package com.aaa.member.controller;

import com.aaa.member.service.MemberService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;

/**
 * @author JYH
 * @version 1.0
 * @date 2023/3/14 15:47
 */
@Api(value = "/member", tags = {"会员控制"})
@RestController
@RequestMapping("/member")
public class MemberControllerF {
    @Autowired
    private MemberService memberService;

    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", dataType = "int", name = "id", value = "", required = true),
            @ApiImplicitParam(paramType = "query", dataType = "double", name = "accountBalance", value = "", required = true)
    })
    @ApiOperation(value = "", notes = "")
    @RequestMapping("/updateAmount")
    public Integer updateAmount(Integer id, Double accountBalance){
        return memberService.updateAmount(id,accountBalance);
    }
}
